﻿using AutoTest.Business.Options;

namespace AutoTest.Business.IServices.Common
{
    /// <summary>
    /// 邮件服务
    /// </summary>
    public interface IMailKitService
    {
        /// <summary>
        ///发送邮件
        /// </summary>
        /// <param name="toAddressList">接收人</param>
        /// <param name="title">标题</param>
        /// <param name="content">内容</param>
        /// <param name="attachments">附件</param>
        /// <returns></returns>
        Task SendMail(List<KeyValuePair<string, string>> toAddressList, string title, string content, List<KeyValuePair<string, byte[]>>? attachments = null);
        /// <summary>
        ///发送邮件
        /// </summary>
        /// <param name="serverInfo">邮件服务器配置信息</param>
        /// <param name="toAddressList">接收人</param>
        /// <param name="title">标题</param>
        /// <param name="content">内容</param>
        /// <param name="attachments">附件</param>
        /// <returns></returns>
        void SendMail(MailkitOption serverInfo, List<KeyValuePair<string, string>> toAddressList, string title, string content, List<KeyValuePair<string, byte[]>>? attachments = null);
    }
}
